int __getmainargs(int *, char ***, char ***, int, int *);
int main(int argc, char *argv[]);
void exit(int);
void fgetpos(void*,__int64*);

void mainCRTStartup()
{
    int argc;
    char **argv;
    char **envp;
    int startup_info=1;
    __getmainargs(&argc,&argv,&envp,0,&startup_info);
    exit(main(argc, argv));
}

extern __declspec(dllimport) char _iob[][0x10 + 4 * sizeof(void*)];

void *__acrt_iob_func(unsigned i)
{
    return (void*)&_iob[i];
}

void *__iob_func()
{
    return (void*)_iob;
}

extern __declspec(dllimport) int _fmode;
int *__p__fmode(void)
{
    return &_fmode;
}

#ifdef _WIN64
__int64 _ftelli64(void *f)
{
    __int64 pos;
    fgetpos(f, &pos);
    return pos;
}
#endif

extern long _fltused = 1;
